
// import oimo.common.Vec3;

import { Vec3 } from "../../common/Vec3";

/**
 * A single ray cast hit data.
 */
export class RayCastHit {
	/**
	 * The position the ray hit at.
	 */
	position: Vec3;

	/**
	 * The normal vector of the surface the ray hit.
	 */
	normal: Vec3;

	/**
	 * The ratio of the position the ray hit from the start point to the end point.
	 */
	fraction: number;

	/**
	 * Default constructor.
	 */
	constructor() {
		this.position = new Vec3();
		this.normal = new Vec3();
		this.fraction = 0;
	}
}
